package main

import (
	"context"
	"fmt"

	example "gitee.com/yungrun/project/svr/auth/proto/example"
	micro "github.com/micro/go-micro"
)

func main() {
	// create a new service
	service := micro.NewService()

	// parse command line flags
	service.Init()
	// create the greeter client using the service name and client
	ex := example.NewExampleService("go.micro.srv.auth-srv", service.Client())

	// request the Hello method on the Greeter handler
	rsp, err := ex.Call(context.TODO(), &example.Request{
		Name: "John",
	})
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(rsp.Msg)
}
